London | 26-Sep-ITP| Frumentius Tesfay | Sprint 2 | Coursework - #1541
Frumentius-Rev wants to merge 20 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
abdishakoor-dev
left a comment
There was a problem hiding this comment.
This is a strong submission. 2-mandatory-errors/3.js is exactly what that section asks for, and all five answers in 1-percentage-change.js are right.
A few things before I can mark it Complete:
-
2-mandatory-errors/1.jsand2.jsboth still stop with an error when you run them. See my comment on each. -
1-key-exercises/4-random.js, see my comment. -
3-mandatory-interpret/2-time-format.jsline 1 has been changed from the original, see my comment. -
3-mandatory-interpret/2-time-format.jsanswer f, see my comment. -
Could you run Prettier over the
Sprint-2folder? None of the files are formatted at the moment.
Add the Needs Review label again when you have pushed.
| @@ -2,3 +2,6 @@ | |||
|
|
|||
| const age = 33; | |||
| age = age + 1; | |||
There was a problem hiding this comment.
Your explanation is right. Run the file though. It still stops with the same error, because line 3 is still const. This section wants the code fixed as well as explained. One more thing: TypeError is the name of the error. What is the rest of the message node prints after it?
| @@ -3,3 +3,6 @@ | |||
|
|
|||
| console.log(`I was born in ${cityOfBirth}`); | |||
| const cityOfBirth = "Bolton"; | |||
There was a problem hiding this comment.
The error and the reason are both right, and you have the full message this time. The file still stops when you run it though. What would you move, so that line 4 prints "I was born in Bolton"?
| // It will help to think about the order in which expressions are evaluated | ||
| // Try logging the value of num and running the program several times to build an idea of what the program is doing | ||
|
|
||
| //num represents a random whole number between 1 and 100. No newline at end of file |
There was a problem hiding this comment.
This is the right answer. The exercise also asks you to break the expression down. What does Math.random() give you on its own? What does multiplying it by 100 do? And what does Math.floor do to that result which Math.round would not?
| @@ -1,4 +1,4 @@ | |||
| const movieLength = 8784; // length of movie in seconds | |||
| const movieLength = 8788; // length of movie in seconds | |||
There was a problem hiding this comment.
This was 8784 in the original. Trying another value is the right instinct, but put the original back. The program you are explaining should be the one you were given.
| // Maybe a more descriptive movieTime or movieDuration | ||
|
|
||
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer | ||
| // f) The code works for different whole-number values of movieLength |
There was a problem hiding this comment.
This says which values it works for. The question also asks whether it works for all values. Try 59, then -60, then 90.5. What does each one print, and would you show a time that way?
|
Ignore point 3 on my review, about putting |

Learners, PR Template
Self checklist
Task code
CYF-1039
Changelist
I have demonstrated and completed the Sprint 2 requirements.